[]
        
(Showing Draft Content)

GrapeCity.Spreadsheet.Drawing.IPicture.ChangeImage

ChangeImage Method

ChangeImage(string, AspectRatio)

Replaces the current image with a different image.

Declaration
void ChangeImage(string fileName, AspectRatio aspect = (AspectRatio)255)
Sub ChangeImage(fileName As String, Optional aspect As AspectRatio = 255)
Parameters
Type Name Description
string fileName

The path to the new image.

AspectRatio aspect

Specifies how to resize the new image. If omitted, the original height is kept.

ChangeImage(Stream, AspectRatio)

Replaces the current image with a different image.

Declaration
void ChangeImage(Stream stream, AspectRatio aspect = (AspectRatio)255)
Sub ChangeImage(stream As Stream, Optional aspect As AspectRatio = 255)
Parameters
Type Name Description
Stream stream

The image data.

AspectRatio aspect

Specifies how to resize the new image. If omitted, the original height is kept.

ChangeImage(byte[], AspectRatio)

Replaces the current image with a different image.

Declaration
void ChangeImage(byte[] data, AspectRatio aspect = (AspectRatio)255)
Sub ChangeImage(data As Byte(), Optional aspect As AspectRatio = 255)
Parameters
Type Name Description
byte[] data

The image data.

AspectRatio aspect

Specifies how to resize the new image. If omitted, the original height is kept.